<template>
  <div class="css-style-switch">
    <el-switch
      v-if="isObject(form)"
      v-model="form.switch"
    ></el-switch>
    <slot v-if="!isObject(form) || form.switch"></slot>
  </div>
</template>
<script>
import { isObject } from '@/utils/util.js';
export default {
  components: {},
  props: {
    form: {
      type: [Object, String, Number, Array],
    },
  },
  data() {
    return {};
  },
  computed: {},
  watch: {},
  methods: {
    isObject,
  },
};
</script>
<style lang="less" scoped>
.css-style-switch {
  display: flex;
  align-items: center;
  .el-switch {
    margin-right: 10px;
  }
}
</style>
